<?php
namespace Swiftx\Support;
/**
 * 系统公共父类
 * @author		胡永强 <odaytudio@gmail.com>
 * @since		2015-01-17
 * @copyright	Copyright (c) 2014-2015 Swiftx Inc.
 * @package     Swiftx\Common
 */

trait Property {

    /**
     * 魔术方法Get
     * @access Attribute
     * @param string $name
     * @return mixed
     */
    public function __get($name){
        $method = '__get'.$name;
        return $this->$method();
    }

    /**
     * 魔术方法Set
     * @access Attribute
     * @param string $name
     * @param mixed $value
     */
    public function __set($name,$value){
        $method = '__set'.$name;
        return $this->$method($value);
    }

}